package club.janna.study.spring;

import club.janna.study.spring.context.JannaAnnotationApplicationContext;
import club.janna.study.spring.context.JannaClasspathXmlApplicationContext;
import club.janna.study.spring.service.HelloService;
import club.janna.study.spring.service.UserService;

public class Bootstrap {
    public static void main(String[] args) {
        JannaClasspathXmlApplicationContext context = new JannaClasspathXmlApplicationContext("spring.xml");
        UserService userService = context.getBean("userService");
        System.out.println(userService);
        userService.test();

        JannaAnnotationApplicationContext context1 = new JannaAnnotationApplicationContext("club.janna.study.spring");
        HelloService helloService = context1.getBean("helloService");
        System.out.println(helloService);
        helloService.test();
    }
}
